package collection.map;

import java.util.LinkedHashMap;
import java.util.TreeMap;

/**
 * @Author: Miyako
 * @Date: 2024-07-22-17:09
 * @Description:
 */
public class MapDemo03 {
    public static void main(String[] args) {

        LinkedHashMap<String,String> Lmap = new LinkedHashMap<>();//会记录插入顺序
        Lmap.put("3","1");
        Lmap.put("6","2");
        Lmap.put("9","3");
        Lmap.put("1","4");
        System.out.println(Lmap);
        TreeMap<Integer,String> Tmap = new TreeMap<>();//会按照key进行排序
        Tmap.put(1,"1");
        Tmap.put(2,"2");
        Tmap.put(3,"3");
        Tmap.put(4,"4");
        System.out.println(Tmap);




    }
}
